
	<table cellspacing="0" cellpadding="0" border="0" class="listTable">
		<tbody>
		  <tr class="thead">
			<td><a href="/admin/manage-artwork-category">Category管理</a></td>
			<td><a href="/admin/manage-artwork-tag">Tag管理</a></td>
			<td><a href="/admin/manage-artwork-style">Style管理</a></td>
			<td><a href="/admin/manage-artwork-subject">Subject管理</a></td>
		  </tr>
		</tbody>
	</table>
	<br />
	<div class="topBar">
      <div class="topTitle">艺术品列表</div>
      <div class="topButton"><a href="/admin/add-artwork" target="_self"><img src="/images/admin/addNew.gif"/></a></div>
    </div>
	
	<table cellspacing="0" cellpadding="0" border="0" class="listTable">
	<tbody>
	  <tr class="thead">
		<td>ID</td>
		<td>艺术品</td>
		<td>显示位置</td>
		<td>作者</td>
		<td>操作</td>
	  </tr>
	  <?php
	  $currentArtist = 0;
	  foreach ($this->artworks as $artwork){
	  	if($currentArtist != $artwork->artist){
	  		$table = new Model_DbTable_Artist();
	  		$theArtist = $table->fetchRow("id = $artwork->artist");
	  	}
	  	?>
	 
	  <tr>
		<td><?php echo $artwork->id;?></td>
		<td><a target="_self" href="/admin/edit-artwork/id/<?php echo $artwork->id;?>"><?php echo $artwork->name;?></a></td>
		<td><a target="_self" href="/admin/edit-artwork/id/<?php echo $artwork->id;?>"><?php echo ($artwork->display_positions ? "首页推荐" : "普通列表");?></a></td>
		<td><a target="_self" href="/admin/edit-artist/id/<?php echo $artwork->artist;?>"><?php echo $theArtist->name;?></a></td>
		<td><a target="_self" href="/admin/edit-artwork/id/<?php echo $artwork->id;?>">编辑</a>
		&nbsp;&nbsp;&nbsp;&nbsp;<a target="_self" href="/admin/delete-artwork/id/<?php echo $artwork->id;?>">删除</a></td>
	  </tr>
	  <?php
	   }
	  ?>
	</tbody>
	</table>
	
